from pydantic import RedisDsn
from pydantic_settings import BaseSettings


class AppConfigSettings(BaseSettings):
    """应用配置"""

    app_name: str = "ai_picture"
    app_port: int = 8805
    app_env: str = "dev"
    app_debug: bool = False
    app_img_domain: str
    """wx小程序配置"""
    wx_app_id: str
    wx_app_secret: str
    """jwt配置"""
    jwt_enabled: bool = False
    jwt_secret_key: str = "12345789@98765431"
    jwt_algorithm: str = "HS256"
    jwt_expired: int = 30
    jwt_iss: str = "猿码记"
    jwt_no_check_uris: str = ""
    """数据库配置"""
    db_host: str
    db_port: int
    db_user: str
    db_password: str
    db_database: str
    """redis配置"""
    redis_dsn: RedisDsn = None
    redis_host: str = "127.0.0.1"
    redis_port: int = 6379
    redis_password: str = None
    redis_db: int = 0
    """ai模型配置"""
    rem_model_path: str
    """图片路径"""
    picture_save_path: str
    picture_bg_path: str
    picture_input_path: str
